<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>详情页面.dangdang</div></title>
    <link rel="stylesheet" href="../css/detail.css">
    <link rel="stylesheet" href="../lib/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" href="../lib/swiper/css/swiper.min.css">
    <link rel="stylesheet" href="../lib/font/iconfont.css">
</head>
<body>
   <!-- 头部 -->
    <div id="header">
    <!-- 头部版心 -->
    <div class="header-con">
    <div class="header-con-right">
            <li>欢迎光临当当，请
          <a href="login.html" target="_blank">
            <span style="color:red;">登录</span>
          </a>
        </li>
        <li>
          <a href="">
            <span>成为会员</span>
          </a>
        </li>
        <li>|</li>
        <li>
          <a href="">
            <span>我的云书房</span>
          </a>
        </li>
        <li>|</li>
        <li>
          <a href="">
            <span>我的当当</span>
          </a>
        </li>
        <li>|</li>
         <li>
          <a href="">
            <span>0元领物</span>
          </a>
        </li>
        <li>|</li>
         <li>
          <a href="">
            <span>小说投稿</span>
          </a>
        </li>
        <li>|</li>
         <li>
          <a href="">
            <span>我要出书</span>
          </a>
        </li>
        <li>|</li>
         <li>
          <a href="">
            <span>企业采购</span>
          </a>
        </li>
        <li>|</li>
         <li>
          <a href="">
            <span>客户服务</span>
          </a>
        </li>
      </ul>
    </div>
    </div>
    </div>
      <!--导航 -->
    <div id="nav">

    <!--导航版心  -->
   <div class="nav-con">

   <!--导航版心上  -->
   <div class="nav-con-top">
   <img src="http://img61.ddimg.cn/upload_img/00405/luyi/DDlogoNEW.gif" style="background:red;">

   <!-- 搜索框 -->
   <div class="nav-search">
   <input type="text" value="三年级课外阅读必读书">
   <button><i class="iconfont icon-fangdajing"></i></button>
   </div>
   <a  href="cart.html" target="_blank"> <i class="iconfont icon-qicheqianlian-"></i> 购物车</a>
   </div>
    <!-- 导航版心下 二级渲染 -->
      <ul class="nav-cen">
        <li class="lil" style="margin-left:0px;">
          全部商品分类 
          <i class="iconfont icon-arrow-left" style="margin-left:80px;font-size:16px;"></i>
          <div class="category-list clearfix">  
          </div>
        </li>
        <li><a href="">图书</a></li>
        <li><a href="">电子书</a></li>
        <li><a href="">网络文学</a></li>
        <li><a href="">服装</a></li>
        <li><a href="">运动户外</a></li>
        <li><a href="">运婴童</a></li>
        <li><a href="">家具</a></li>
        <li><a href="">当当优品</a></li>
        <li><a href="">食品</a></li>
        <li><a href="">Apple</a></li>
        <li><a href="">电器城</a></li>
      </ul>
   </div> 
   </div>
   <div id="detail-content">
  <img src="../images/index1_03.jpg">
  <ul>
   <li><a href="">图书</a>></li>
   <li><a href="">成功/励志</a>></li>
   <li><a href="">人生哲学</a>></li>
   <li><a href="">人生智慧</a>></li>
  </ul>
      <!-- 放大镜 -->
      <div class="box" >
			<div class="small">
				<img src="../images/detail-fangdajing1.jpg" alt="" width="350px" height="350px"/>
				<div class="mask"></div>
			</div>
			<div class="big">
				<img src="../images/detail-fangdajing2.jpg" alt="" class="bigImg" width="800px" height="800px"/>
			</div>
            <script>
             var small = $('.small');
	         var mask = $('.mask');
	        var big = $('.big');
	var box = small.parentNode;
	var bigImg = $('.bigImg');
	small.onmouseenter = function(){
		mask.style.display = "block";
		big.style.display = "block";
	}
	small.onmouseleave = function(){
		mask.style.display = "none";
		big.style.display = "none";
	}
		 small.onmousemove=function(e){
		 	var event=e||window.event;
			var x=event.clientX+getScroll().left-box.offsetLeft-mask.offsetWidth/2;
			var y=event.clientY+getScroll().top-box.offsetTop-mask.offsetHeight/2;
			if(x<0){
				x=0;
			}
			if(x>small.offsetWidth-mask.offsetWidth){
				x=small.offsetWidth-mask.offsetWidth;
			}
			if(y<0){
				y=0;
			}
			if(y>small.offsetHeight-mask.offsetHeight){
			y=small.offsetHeight-mask.offsetHeight  
			}
			mask.style.left = x+"px";
			mask.style.top = y+"px";
			var left=x/small.offsetWidth*bigImg.offsetWidth;
			var top=y/small.offsetHeight*bigImg.offsetHeight;
			bigImg.style.left=-left+"px";
			bigImg.style.top=-top+"px";
        }
    </script>
    <script></script>
        </div>
        </div>
        <script src="../lib/jquery/dist/jquery.min.js"></script>
        <script src="../js/detail.js"></script>
</body>
</html>